@import './mixin.scss';

* {
    margin: 0;
    padding: 0;
}

*,
*:before,
*:after {
    box-sizing: inherit;
}

a:focus,
a:active {
    outline: none;
}

a,
a:focus,
a:hover {
    text-decoration: none;
}

div:focus {
    outline: none;
}

html {
    width: 100%;
    height: 100%;
}

body {
    font-size: 14px;
    height: 100%;
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    font-family:
        Helvetica Neue,
        Helvetica,
        PingFang SC,
        Hiragino Sans GB,
        Microsoft YaHei,
        Arial,
        sans-serif;
}

.clearfix {
    &:after {
        visibility: hidden;
        display: block;
        font-size: 0;
        content: ' ';
        clear: both;
        height: 0;
    }
}

/* 滚动条凹槽的颜色，还可以设置边框属性 */
*::-webkit-scrollbar-track-piece {
    background-color: #22457a;
    -webkit-border-radius: 2em;
    -moz-border-radius: 2em;
    border-radius: 2em;
}

/* 滚动条的宽度 */
*::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

/* 滚动条的设置 */
*::-webkit-scrollbar-thumb {
    background-color: #618bca;
    background-clip: padding-box;
    -webkit-border-radius: 2em;
    -moz-border-radius: 2em;
    border-radius: 2em;
}

/* 滚动条鼠标移上去 */
*::-webkit-scrollbar-thumb:hover {
    background-color: #295eae;
}

.ellipsis {
    overflow: hidden;
    word-break: normal;
    text-overflow: ellipsis;
}

/***
*覆盖element组件样式
*/
//去除el-scrollbar组件横向滚动
.el-scrollbar .el-scrollbar__wrap {
    overflow-x: hidden;
}

.el-dropdown-menu {
    background-color: $select-dropdown-bg-color !important;
    border: $com-default-border !important;
}

.el-message-box {
    border-color: #ffffff2b !important;
    background-color: $modal-bg-color !important;
}

.table-search {
    // margin-bottom: 10px;
    margin-bottom: 16px;
    padding: 16px 24px 24px;
    box-sizing: border-box;
    border-radius: 4px;
    box-shadow: 0 0 12px #0000000d;
    background-color: $table-search-bg-color;
}

// el-picker-panel样式重置
.el-picker-panel {
    background-color: $modal-bg-color !important;

    .el-date-table td.in-range div,
    .el-date-table.is-week-mode .el-date-table__row.current div,
    .el-date-table.is-week-mode .el-date-table__row:hover div {
        background: rgba(255, 255, 255, 0.2) !important;
    }
}

.el-picker-panel__footer {
    background-color: $modal-bg-color !important;
}

.el-range-input {
    background-color: $com-bg-color !important;
}

.el-time-spinner__item:hover:not(.disabled):not(.active) {
    background: $primary-color !important;
}

.el-time-spinner__item.active:not(.disabled) {
    color: $primary-color !important;
}

.el-textarea .el-input__count {
    background: $com-bg-color !important;
}

.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
    background-color: $primary-color !important;
}

.el-input__count-inner {
    background: transparent !important;
}

.el-time-panel {
    background-color: $modal-bg-color !important;
}

.el-year-table td.disabled .cell,
.el-month-table td.in-range div,
.el-date-table td.disabled div,
.el-month-table td.disabled .cell {
    background-color: rgba(255, 255, 255, 0.3) !important;
}

// tree样式重置
.energy-tree {
    background: transparent !important;

    .el-checkbox__input.is-checked .el-checkbox__inner,
    .el-checkbox__inner:hover {
        border-color: rgba(255, 255, 255, 1) !important;
    }
}

// el-tree-select 样式重置
.el-tree-select-popper {
    border-color: #ebeef552 !important;

    .el-tree {
        background: transparent !important;
    }

    .el-tree-node__content:hover {
        background: #f5f7fa2b !important;
    }

    .el-tree-node:focus>.el-tree-node__content {
        background: #f5f7fa2b !important;
    }
}

// input样式重置
.el-input-group {

    .el-input-group__append,
    .el-input-group__prepend {
        background: transparent !important;
        color: $com-default-border-color;
        border-color: $com-default-border-color;
    }

    .el-input__inner:hover {
        border-color: $com-default-border-color;
    }
}

// tabs切换样式重置
.el-tabs__item {
    color: #ffffff7a;

    &.is-active {
        color: $primary-color;
    }
}

//tooltip 样式重置
.el-tooltip__popper {
    background: $modal-bg-color !important;
    color: $table-search-text-color !important;
    border-color: $com-default-border-color !important;
}

.el-tooltip__popper.is-light[x-placement^='bottom'] .popper__arrow::after {
    border-bottom-color: $modal-bg-color !important;
}

.el-tooltip__popper.is-light[x-placement^='bottom'] .popper__arrow {
    border-bottom-color: $com-default-border-color !important;
}

//pagination 样式重置
.el-pagination {
    .btn-next {
        background: transparent !important;
    }
}

// SELECT 样式重置
.time-select-item:hover {
    background-color: $primary-color !important;
}

.el-select-dropdown__item.is-disabled:hover {
    background: rgba(255, 255, 255, 0.2) !important;
}

input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
}

input[type='number'] {
    -moz-appearance: textfield !important;
}

// 按钮样式
.el-button--warning {
    background: #DC7500 !important;
}

.el-button--warning:hover {
    background: #FBB143 !important;
}

.el-button--warning.is-active,
.el-button--warning:active {
    background: #DC7500 !important;
}

.el-button--warning.is-disabled,
.el-button--warning.is-disabled:hover {
    background: #e8c38c !important;
}